//
//  AFHTTPSessionManager+DXWManager.m
//  BuDeJie
//
//  Created by 淡馨慰 on 16/7/30.
//  Copyright © 2016年 淡馨慰. All rights reserved.
//

#import "AFHTTPSessionManager+DXWManager.h"

@implementation AFHTTPSessionManager (DXWManager)

+ (instancetype)dxw_Manager
{
    //1. 创建会话请求对象 --- 自定义请求对象 允许接收text/html
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];

    //2. 自定义响应者
    //@"application/json", @"text/json", @"text/javascript"
    
    //返回是NSString
    AFJSONResponseSerializer *response = [AFJSONResponseSerializer serializer];
    
//    AFHTTPResponseSerializer *response = [AFHTTPResponseSerializer serializer];
    //添加contextTypes
    response.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript",@"text/html",nil];
    manager.responseSerializer = response;
    
    return manager;


}


@end
